Ruby on Rails ActiveScaffold: Showing {{model}} instead of model name?
Posted
by
AnExtremelySmellyPerson
on Stack Overflow
See other posts from Stack Overflow
or by AnExtremelySmellyPerson
Published on 2010-12-16T12:15:45Z
Indexed on
2011/01/16
9:53 UTC
Read the original article
Hit count: 183
Hi there,
I'm using ActiveScaffold with Ruby on Rails and I'm loving it, however there is one weird thing. Whenever I hit "Edit" or "Create New" in my webapp's ActiveScaffold, it says "Create {{model}}" or "Update {{model}}" in the webapp rather than using the model's name. Why is this? I have an ads_controller.rb that includes this:
active_scaffold :ad do |config|
config.label = "Ads"
config.columns = [:name, :description, :imageUrl, :linkUrl, :apps, :created_at, :updated_at]
config.update.columns = [:name, :description, :imageUrl, :linkUrl, :apps]
config.create.columns = config.update.columns
list.sorting = {:created_at => 'DESC'}
columns[:imageUrl].label = "Image URL"
columns[:linkUrl].label = "Link URL"
end
And my routes.rb includes this:
map.namespace :admin do |admin|
admin.root :controller => 'admin_home', :action => 'index'
admin.resources :ads, :active_scaffold => true
end
Any thoughts on why I'm seeing "Create {{model}}" instead of "Create ad" ?
© Stack Overflow or respective owner